#pragma once

namespace StereoCorrespond {

	using namespace System;
	using namespace System::ComponentModel;
	using namespace System::Collections;
	using namespace System::Windows::Forms;
	using namespace System::Data;
	using namespace System::Drawing;

	/// <summary>
	/// Summary for GaussOptionWindow
	/// </summary>
	public ref class GaussOptionWindow : public System::Windows::Forms::Form
	{
	public:
		property Double Sigma {
			Double get() {
				return sigmaTrackBar->Value/10.0; 
			}
		}

		GaussOptionWindow(void)
		{
			InitializeComponent();
			sigmaTrackBar->Value = 20;
		}

	protected:
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		~GaussOptionWindow()
		{
			if (components)
			{
				delete components;
			}
		}
	private: System::Windows::Forms::Label^  gaussLabel;
	private: System::Windows::Forms::TrackBar^  sigmaTrackBar;
	private: System::Windows::Forms::Label^  valueLabel;
	private: System::Windows::Forms::Button^  runButton;

	private:
		/// <summary>
		/// Required designer variable.
		/// </summary>
		System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		void InitializeComponent(void)
		{
			this->gaussLabel = (gcnew System::Windows::Forms::Label());
			this->sigmaTrackBar = (gcnew System::Windows::Forms::TrackBar());
			this->valueLabel = (gcnew System::Windows::Forms::Label());
			this->runButton = (gcnew System::Windows::Forms::Button());
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->sigmaTrackBar))->BeginInit();
			this->SuspendLayout();
			// 
			// gaussLabel
			// 
			this->gaussLabel->AutoSize = true;
			this->gaussLabel->Location = System::Drawing::Point(12, 9);
			this->gaussLabel->Name = L"gaussLabel";
			this->gaussLabel->Size = System::Drawing::Size(72, 13);
			this->gaussLabel->TabIndex = 0;
			this->gaussLabel->Text = L"Gauss Sigma:";
			// 
			// sigmaTrackBar
			// 
			this->sigmaTrackBar->Anchor = static_cast<System::Windows::Forms::AnchorStyles>(((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Left) 
				| System::Windows::Forms::AnchorStyles::Right));
			this->sigmaTrackBar->Location = System::Drawing::Point(12, 25);
			this->sigmaTrackBar->Maximum = 100;
			this->sigmaTrackBar->Minimum = 1;
			this->sigmaTrackBar->Name = L"sigmaTrackBar";
			this->sigmaTrackBar->Size = System::Drawing::Size(301, 45);
			this->sigmaTrackBar->TabIndex = 1;
			this->sigmaTrackBar->Value = 15;
			this->sigmaTrackBar->ValueChanged += gcnew System::EventHandler(this, &GaussOptionWindow::sigmaTrackBar_ValueChanged);
			// 
			// valueLabel
			// 
			this->valueLabel->AutoSize = true;
			this->valueLabel->Location = System::Drawing::Point(91, 13);
			this->valueLabel->Name = L"valueLabel";
			this->valueLabel->Size = System::Drawing::Size(0, 13);
			this->valueLabel->TabIndex = 2;
			// 
			// runButton
			// 
			this->runButton->Location = System::Drawing::Point(238, 76);
			this->runButton->Name = L"runButton";
			this->runButton->Size = System::Drawing::Size(75, 23);
			this->runButton->TabIndex = 3;
			this->runButton->Text = L"Run";
			this->runButton->UseVisualStyleBackColor = true;
			this->runButton->Click += gcnew System::EventHandler(this, &GaussOptionWindow::runButton_Click);
			// 
			// GaussOptionWindow
			// 
			this->AcceptButton = this->runButton;
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->ClientSize = System::Drawing::Size(325, 109);
			this->Controls->Add(this->runButton);
			this->Controls->Add(this->valueLabel);
			this->Controls->Add(this->sigmaTrackBar);
			this->Controls->Add(this->gaussLabel);
			this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedDialog;
			this->MaximizeBox = false;
			this->MinimizeBox = false;
			this->Name = L"GaussOptionWindow";
			this->Text = L"GaussOptionWindow";
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->sigmaTrackBar))->EndInit();
			this->ResumeLayout(false);
			this->PerformLayout();

		}
#pragma endregion

		private: System::Void sigmaTrackBar_ValueChanged(System::Object^  sender, System::EventArgs^  e);
		private: System::Void runButton_Click(System::Object^  sender, System::EventArgs^  e);
	};
}
